<?php if(!defined('IN_PISCES')){exit('Access Denied.');}?>
<script  language="javascript" src="{$this->data['baseurl']}js/jquery/jquery.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
function doLogin(){
	$('#spLoginInfo').html('');
	var username	= $('#txtUsername').val();
	var password	= $('#txtPassword').val();
	var loginUrl	= $('#hdLoginUrl').val();
	
	$('#spLoginInfo').html('正在登录...');
	
	$.ajax({
	    url: loginUrl,
	    type: 'POST',
	    data:{'username':username,'password':password,'rnum':Math.random()},
	    dataType: 'json',
	    success: function(res){
			if(res.code<=0){
				$('#spLoginInfo').html('登录失败，请检查你的输入！');
			}else{
				document.location	= res.data.forward;
			}
		},
		error:function(res){
			alert(res.responseText);
		}
	});
}
</script>
<div class="login_main">
  <link href="{$this->data['baseurl']}css/tzm/member.css" rev="stylesheet" rel="stylesheet" type="text/css" media="screen">
  <div id="header" class="hd">
    <div class="mod-logo">
      <p class="title"> <a></a> <span class="sub-title">登录</span> </p>
      <p class="additional"> <span> 如需帮助，请咨询{if $this->data['site']['qq']!=''}<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin={$this->data['site']['qq']}&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:{$this->data['site']['qq']}:42" alt="点击这里给我发消息" title="点击这里给我发消息"></a>&nbsp;&nbsp;{/if}</span> </p>
    </div>
  </div>
  <div class="main">
    <div class="main952_box martop20">
      <div class="loginleft"> <img src="{$this->data['baseurl']}images/login_bg.jpg" alt="会员登录"> </div>
      <div class="loginright">
        <div class="signindiv freeregpad nobg">
          <div class="div1"> {$this->data['site']['site_name']}会员登录 </div>
          <div class="loginbox">
            <p> <em>帐号</em>
              <input id="txtUsername" class="inputwd1" type="text" name="username" size="15" maxlength="50"  tabindex="1">
              <!--<a href="" class="retrieve-userid">找回登录名</a>--> </p>
            <p> <em>密码</em>
              <input id="txtPassword" class="inputwd1 " type="password" name="password" maxlength="20" tabindex="2">
              <!--<a href="" class="retrieve-password">找回密码</a>--> </p>
            <p>
              <input type="submit" tabindex="3" class="signinbutton" value="登 录" onclick="doLogin()">
              <input type="hidden" id="hdLoginUrl" value="{url('User','DoLogin')}" />
              <a class="freeregister" onclick="document.location='{url('User','Setup')}'" href="#">免费注册</a> </p>
            <p style="text-align:center;"><span class="spInfo" id="spLoginInfo"></span></p>
          </div>
        </div>
        <p class="mod-tb-signin"> <em>您还可以</em> <a href="#" onclick="document.location='{$this->data['taobaoLoginUrl']}'"  target="_self" style="color:#F30;font-size:16px;font-weight:bold">直接用淘宝帐号登录</a> </p>
        <div class="footer-line"></div>
      </div>
    </div>
    <div class="top25_box"></div>
  </div>
</div>
<script language="javascript">
document.onkeydown=function(event)
{
	if(event==null)
	{
		event	= window.event;
	}
	if(event.keyCode==13) 
	{ 
		doLogin();
	} 
}
</script>